<template>
  <div class="">
    <PackingSpecificationMaintainTop ref="top"></PackingSpecificationMaintainTop>
    <PackingSpecificationMaintainBottom ref="bottom" v-if="isShow" :mcode = 'mcode'></PackingSpecificationMaintainBottom>
  </div>
</template>

<script type="text/javascript">
import PackingSpecificationMaintainTop from './modules/PackingSpecificationMaintainTop.vue';
import PackingSpecificationMaintainBottom from './modules/PackingSpecificationMaintainBottom.vue';
export default {
  name: 'PackingSpecificationMaintain',
  data() {
    return {
      mcode: '',
      isShow: false
    }
  },
  mounted() {
  },
  methods: {
    selectProductChange(mcode) {
      this.isShow = !!mcode
      this.$nextTick( () => {
        this.mcode = mcode
      } )
    },
    updateBottom(){
      this.$refs.bottom.loadData(1)
    },
    updateHasSpecification(mcode, isHasSpecification){
      this.$refs.top.updateHasSpecification(mcode, isHasSpecification)
    }
  },
  components: {
    PackingSpecificationMaintainTop,
    PackingSpecificationMaintainBottom,
  }
}
</script>

<style lang="less" scoped>
</style>
